package Factory;

public class FactoryPattern {


    public static Computer createComputer(String info){
        switch (info){
            case "huawei":
                Computer c=new Huawei();
                c.setName("huawei mate 20");
                c.setPrice(9999.0);
                return c;

            case "mac":
                Computer c1=new Mac();
                c1.setName("mac mate 30");
                c1.setPrice(9999.0);
        }
        return null;
    }
}
